package userlogmodel

type UGroupID struct {
	UGroupID int
}

type LogNum struct {
	NormLogNum int
	WarnLogNum int
}

type GetPageLogs struct {
	PageSize  int    `validate:"required"`
	PageNo    int    `validate:"required"`
	BeginTime string `validate:"required"`
	EndTime   string `validate:"required"`
}

type GetAllLogs struct {
	BeginTime string `validate:"required"`
	EndTime   string `validate:"required"`
}

type GetLogsByUserID struct {
	GetPageLogs
	UserID int `validate:"required"`
}

type GetPageLogsByUGroupID struct {
	GetPageLogs
	UGroupID int `validate:"required"`
}

type GetAllLogsByUGroupID struct {
	BeginTime string `validate:"required"`
	EndTime   string `validate:"required"`
	UGroupID  int    `validate:"required"`
}

type GetLogsByUserName struct {
	GetPageLogs
	UserName string `validate:"required"`
}

type UserLog struct {
	// 必需字段
	IdentityIdentifier string `validate:"required"`
	Command            string `validate:"required"`
	UGroupID           int    `validate:"omitempty"`
	IsInner            int    `validate:"required"`
	Name               string `validate:"required"`
	Source             string `validate:"required"`
	Data               string `validate:"required"`
	Permission         string `validate:"required"`
	Level              int    `validate:"required"` // 1 表示普通日志 2 表示告警日志
	Timestamp          string `validate:"required"`
	// 不必需
	Destination   string `validate:"omitempty"`
	Protocol      string `validate:"omitempty"`
	WebSite       string `validate:"omitempty"`
	FilterWebSite string `validate:"omitempty"`
	WarnInfo      string `validate:"omitempty"`
}
